Skip to content

feat(logs): stream logs with follow#20

Draft
swkeever wants to merge 3 commits into
mainfrom
skeever/log-stream-cli
Draft

feat(logs): stream logs with follow#20
swkeever wants to merge 3 commits into
mainfrom
skeever/log-stream-cli

Conversation

@swkeever

Copy link
Copy Markdown
Collaborator

Summary

  • add a no-timeout project log stream client for POST /projects/{projectID}/logs/stream
  • wire --follow for function and frontend runtime/build logs
  • stop followed build logs when the deployment reaches a terminal status, then run a duplicate-suppressed catch-up search

Depends on Kong/volcano-hosting#471.

Tests

  • make lint
  • go test ./...
  • go build ./...

swkeever added 3 commits June 26, 2026 12:01
The deployment follow loop returned as soon as the log stream closed,
skipping the duplicate-suppressed catch-up search whenever the stream
ended (EOF) before the poller observed a terminal status. Keep polling
after a clean stream shutdown and check terminal status immediately so
the catch-up search still runs without waiting for the next poll.
The runtime --follow loop ended as soon as the SSE stream closed, so a
dropped connection (load-balancer cap, redeploy, network blip) silently
stopped the tail even though the backend supports resuming. Reconnect
from the last stream cursor (Last-Event-ID) until the context is
canceled, relying on the server's overlap window and seen-set dedup to
avoid replaying recent events.

Deployment (build) follow is unchanged: its terminal poll and
duplicate-suppressed catch-up search already recover logs missed during
a disconnect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant